<template>
	<view class="container">
		<u-navbar :is-back="false" :border-bottom="false">
			<view class="slot-wrap flex align-center">
				<text class="cuIcon-back" @click="Back"></text>
				搜索
			</view>
		</u-navbar>
		<view class="search-input">
			<u-search placeholder="搜索商品" v-model="keyword" style="width: 100%;" @search="routes('')"
				@custom="routes('')"></u-search>
		</view>
		<view class="main">
			<view class="history">
				<view class="title">
					<view class="text">历史记录</view>
					<view class="cuIcon-delete u-font-34">
					</view>
				</view>
				<view class="content">
					<view v-for="(item,i) in historyText" :ket="i">{{item}}</view>
				</view>
			</view>
			<view class="interested">
				<view class="title">
					<view class="text">热门搜索</view>
				</view>
				<view class="content">
					<view v-for="(item,i) in historyText" :ket="i">{{item}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				historyText: ['英语课程', '数学课程', '语文课程', '体育课程', '课程', '文化课程'],
				keyword: ''
			};
		},
		components: {

		},
		methods: {
			Back(){
				uni.navigateBack({
				});
			},
			routes(data) {
				uni.navigateTo({
					url: data
				});
			},
		}
	};
</script>

<style>
	.container {
		height: 100vh;
		background-color: #FFFFFF;
	}

	.cuIcon-search {
		width: 7%;
		margin: 0 2%;
		font-size: 38rpx;
		text-align: center;
		color: #ABABAB;
	}

	.search-input {
		display: flex;
		justify-content: center;
		padding: 20rpx 25rpx;
		/* border-bottom: #EEEEEE 2rpx solid; */
	}

	.weui-cell__bd {
		width: 94%;
		background-color: #F23D3D;
		border-radius: 50rpx/50rpx;
		height: 60rpx;
		display: flex;
		align-items: center;
		border: #FFFFFF 1rpx solid;
		background-color: #F7F7F7;
	}

	.weui-input {
		line-height: 60rpx;
		width: 85%;
		height: 60rpx;
	}

	.placeholder-input {
		font-size: 30rpx;
	}

	.main {
		margin: 0 25rpx;
	}

	.history {
		margin-top: 40rpx;
	}

	.title {
		font-size: 27rpx;
		display: flex;
		justify-content: space-between;
		margin-bottom: 10rpx;
	}

	.title .text {
		font-size: 28rpx;
	}

	.content {
		display: flex;
		flex-wrap: wrap;
	}

	.content view {
		background-color: #F5F5F5;
		color: #A2A29F;
		border-radius: 50rpx;
		padding: 10rpx 20rpx;
		margin-right: 24rpx;
		margin-top: 24rpx;
		font-size: 24rpx;
	}

	.interested {
		margin-top: 50rpx;
	}
</style>
